﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace FinalProject
{
    public class Coordinate
    {
        /// <summary>
        /// Class Variables
        /// </summary>
        private float latitude;
        private float longitude;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="lat">Latitude represented as a floating point value</param>
        /// <param name="lon">Longitude represented as a floating point value</param>
        public Coordinate(float lat, float lon){
            latitude = lat;
            longitude = lon;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>The value of this coordinate as a Coordinate object.</returns>
        public Coordinate getCoordinate(){
            
            return new Coordinate(latitude, longitude);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>Latitude as a floating point value.</returns>
        public float getLatitude(){
            return latitude;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>Longitude as a floating point value.</returns>
        public float getLongitude(){
            return longitude;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>Formated string of the latitude value.</returns>
        public string getLatitudeToString(){
            return new string(string.Format("{0:0000}", latitude));
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>Formatted string of the longitude value.</returns>
        public string getLongitudeToString(){
            return new string(string.Format("0:000", longitude ) );
        }
    }
}
